<template>
  <!-- <h1>华盛检测技术有限公司（内用）试验检测系统</h1> -->
  <div>
    <div class="home_box">
      <!-- 系统类型，0为建委，1为交委系统 -->
      <div
        class="left_box mr"
        @click="routerHome('1')"
      >
        交委委托
      </div>
      <div
        class="left_box"
        @click="routerHome('0')"
      >
        建委委托
      </div>
    </div>
  </div>
</template>

<script lang='ts'>
import { defineComponent, reactive, ref } from "vue";
import { useRouter } from "vue-router";
import { systemType } from "../../api/module/user";
export default defineComponent({
  setup() {
    const router = useRouter();
    const routerHome = async (item: any) => {
      const res: any = await systemType({ systemType: item });
      if (res.code == 200) {
        sessionStorage.setItem("systemType", item);
        let list: any = sessionStorage.getItem("menuList");
        list = JSON.parse(list);
        router.push(list[0].children[0].id);
      }
    };
    return {
      routerHome,
    };
  },
});
</script>

<style scoped lang="scss" scope>
.home_box {
  width: 100%;
  height: calc(100vh - 40px);
  display: flex;
  align-items: center;
  justify-content: center;

  .left_box {
    width: 400px;
    height: 500px;
    text-align: center;
    line-height: 500px;
    font-size: 30px;
    font-weight: 700;
    border-radius: 8px;
    background-color: rgb(31, 176, 84);
  }

  .mr {
    margin-right: 100px;
  }
}
</style>